package coml.jiyun.hp.wanandroid.presenter;

import coml.jiyun.hp.wanandroid.base.BasePresenter;
import coml.jiyun.hp.wanandroid.bean.SquareBean;
import coml.jiyun.hp.wanandroid.model.SquareModel;
import coml.jiyun.hp.wanandroid.net.ResultCallBack;
import coml.jiyun.hp.wanandroid.view.SquareView;

public class SquarePresenter extends BasePresenter<SquareView> {

    private SquareModel squareModel;

    @Override
    protected void initModel() {
        squareModel = new SquareModel();
        addModel(squareModel);
    }

    public void getSquare(){
        squareModel.getSquare(new ResultCallBack<SquareBean>() {
            @Override
            public void onSuccess(SquareBean squareBean) {
                mView.getSquare(squareBean);
            }

            @Override
            public void onFail(String msg) {

            }
        });
    }
}
